<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
	<head>
		<base href="<%=basePath%>">
		<title>添加角色</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		
		<script type="text/javascript" >
		   
		   
		   var result = "${result}";
  		   if(result=='1'){
  		 		alert("保存成功！");
  		        document.location.href ='${ctx}/pages/role/list.action';
  		   }
  
		   function subForm(){
		   		var name = $("#name").val();
		   		if(checkIsNull(name)){
		   			alert("角色名称不能为空");
		   			$("#name").focus();
		   			return false;
		   		}
		   		$("#roleForm").submit();
		   }
		</script>
	</head>
	<body>
	<div id="body-wrapper">
		<div id="main-content">
			<div class="content-box">
				<!-- Start Content Box -->
				<div class="content-box-header">
					<h3 style="cursor: s-resize;">
						添加角色
					</h3>
					<div class="clear"></div>
				</div>
				<!-- End .content-box-header -->
				<div style="display: block;" class="content-box-content">
					<form method="post" id="roleForm" name="roleForm" action="${ctx}/pages/role/save.action">
						<fieldset>
							
							<p>
								<label>
									角色名称
								</label>
								<input id="name" class="text-input small-input"
									name="role.name" type="text">
							</p>
							
							<p>
								<label>
									备注
								</label>
								<textarea class="text-input textarea " id="remark"
									name="role.remark" rows="8"></textarea>
							</p>
							
							<p>
								<label>
									状态
								</label>
								<select class="small-input" name="role.status">
									<option  value="1">
										启用
									</option>
									<option value="0">
										锁定
									</option>
								</select>
							</p>

							<p>
								<input class="button" value="提交" onclick="subForm();"  type="button">
								<input class="button" value="返回" onclick="history.back();"  type="button">
							</p>
						</fieldset>
						<div class="clear"></div>
						<!-- End .clear -->
					</form>
				</div>
			</div>
		</div>
		</div>
	</body>
</html>
